package com.zyjlab.mqdemo.util;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class MQReceiveUtil {

    @RabbitListener(queues="queue")    //监听器监听指定的Queue
    public void processMs(String str) {
        System.out.println("Received Msg:"+ str);
    }
}
